ackermann(0,N,s(N)).
ackermann(s(M),0,V):-ackermann(M,s(0),V).
ackermann(s(M),s(N),V):-
  ackermann(s(M),N,V1),
  ackermann(M,V1,V).

mcd(X,Y,Mcd) :- mod(X,Y,Z),mcd(Y,Z,Mcd).
mcd(X,0,X):-less-than(0, X).
